/**
 * File: d:\工作\上海项目\上海1\中欧\code\src\api\login.js
 * Project: d:\工作\上海项目\上海1\中欧\code
 * Created Date: 2020-10-09 10:57:32
 * Author: Wang
 * -----
 * Last Modified:  2020-10-09 14:47:39
 * Modified By: Wang
 * -----
 * Copyright (c) 2020 Hisw
 * ------------------------------------
 * Javascript will become your nightmare in your life!
 */

import request from './index'
import axios from 'axios'

//使用
/**
 * 
 * @param {Object} params 
 * @param {VueComponent} that 
 * @param {String} type 
 */
export function getInfo (params, that, type) {
  return request({
    url: '/api/user/info',
    method: 'get',
    params,
    cancelToken: new axios.CancelToken(function executor (c) { // 设置 cancel token
      that[type] = c;
    })
  });
}